
int FirstNotRepeatingChar(char* str) {
    int s[256] = { 0 };
    int si = 0;
    char* str1 = str;
    while (*str1)
    {
        if (s[*str1] == 1)
        {
            s[*str1] = 2;
        }
        if (s[*str1] == 0)
        {
            s[*str1] = 1;
        }
        
        str1++;
    }
    int n = 0;
    while (*str)
    {
        if (s[*str] == 1)
        {
            si = n;
            break;
        }
        n++;
        str++;
    }
    return si;
}

int main()
{
    char s[] = "google";
    int si = FirstNotRepeatingChar(s);
    return 0;
}